//
//  ACHLHttpRequestTool.h
//  hostInfomationViewController
//
//  Created by imac on 16/3/31.
//  Copyright © 2016年 GuoXiaoji. All rights reserved.
//

#import <Foundation/Foundation.h>

//typedef void(^petSuccessBlcok)(NSNumber *code,NSString *msg,NSDictionary *data,NSDictionary *healthy);

typedef  void(^successBlock)(NSNumber *code,NSString *msg,NSDictionary *data);

typedef void(^successArrayBlock)(id responseData);

@interface ACHLHttpRequestTool : NSObject

+(instancetype)shareHttpRequestTool;


/**
 post请求工具类
 */
-(void)postWithURL:(NSString *)url params:(id)params success:(successBlock)success failure:(void(^)(NSError *error))failure;

/**
 get请求工具类
 */
-(void)getWithURL:(NSString *)url params:(NSDictionary *)params success:(successBlock)success failure:(void(^)(NSError *error))failure;
/**
 */
-(void)getArrayWithURL:(NSString *)url params:(NSDictionary *)params successArray:(successArrayBlock)successArray failure:(void (^)(NSError *error))failure;
/**
 post上传头像工具类
 */
-(void)postWithURL:(NSString *)url params:(NSDictionary *)params  formData:(id)formData success:(successBlock)success failure:(void (^)(NSError *error))failure;
@end
